import 'package:dog_miao/home/square.dart';
import 'package:dog_miao/home/task.dart';
import 'package:dog_miao/home/pets.dart';
import 'package:flutter/material.dart';
class Main extends StatefulWidget {
  final int currentKey;
  Main({Key key, this.currentKey}): super(key: key);

  @override
  _Main createState() => _Main();
}

class _Main extends State<Main> {
  List<Widget> navWidget = [
    Square(),
    Task(),
    Pets(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: navWidget[widget.currentKey],
    );
  }
}